DataTables Widget Example

Execute each of these cells in order, such as with

First, load your DataTablesWidget from your module:


In [1]:
from ipython_datatableswidget.widgets.datatables import DataTablesWidget, show_df

Then, create an instance of DataTablesWidget:


In [2]:
#datatablesExample = DataTablesWidget()

Display the widget:


In [3]:
import pandas as pd

In [4]:
df = pd.DataFrame({'a': [1,2,3,4], 'b': ['Hello', 'I', 'am', 'Widget']})

In [5]:
x = show_df(df)


/home/mniekerk/local/anaconda/envs/widgettest/lib/python2.7/site-packages/pandas/core/internals.py:961: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  return self._try_coerce_result(func(values, other))

In [6]:
x

In [11]:
dfB = pd.DataFrame({'column1': pd.np.random.normal(size=100)})

In [18]:
DataTablesWidget(dfB.reset_index())



In [13]:
DataTablesWidget(dfB)


You can have more than one copy of your DataTablesWidget


In [ ]: